﻿@model MvcApplication6.Models.HomeModel
@using MvcApplication6.Models
@using MvcApplication6.common

<!--Section-search -->
	 <section class="right_block main_deal">
       <h3 class="block_title"><span>Tìm kiếm</span></h3>
       <div class="block_content searchBox">
	   

        @using (Ajax.BeginForm("PagingSearch", "Home", new AjaxOptions { 
                HttpMethod = "Post", UpdateTargetId = "listProduct", OnSuccess = "myonsuccessCallServer"}))
        {
            <div class="search-item">
            <input id="sp" type="text" name="nameSearch" onblur="javascript:if(this.value == '')this.value='-- Nhập từ khóa --';" onfocus="javascript:if(this.value == '-- Nhập từ khóa --') this.value='';" value="-- Nhập từ khóa --">
            </div>
            <input type="submit" class="btn_search" value="Tìm kiếm" style="width: 100%;"/>
        }
		
	   
	  @* <div class="search-item">
		<select id="spf" name="spf">
		<option value="0">-- Giá từ --</option>
		<option value="500000">500.000</option>
		<option value="1000000">1.000.000</option>
		<option value="2000000">2.000.000</option>
		<option value="3000000">3.000.000</option>
		<option value="5000000">5.000.000</option>
		</select>
	   </div>
	   <div class="search-item">
		<select id="spt" name="spt">
		<option value="0">-- Giá đến --</option>
		<option value="500000">500.000</option>
		<option value="1000000">1.000.000</option>
		<option value="2000000">2.000.000</option>
		<option value="3000000">3.000.000</option>
		<option value="5000000">5.000.000</option>
		</select>
	   </div>*@
	   

       <!--Section-soical -->
     </section>
	 
    <section class="right_block mod_service">
        <h3 class="block_title"><span>Menu nhanh</span></h3>
        <div class="block_content">
            <ul>
                <li>
                    <a href="/Home/GetProductByFlg2/Sản-Phẩm-Khuyến-mãi">Sản Phẩm Khuyến mãi</a>  
                    
                </li>

                 <li>
                     <a href="/Home/GetProductByFlg3/Sản-phẩm-bán-chạy">Sản phẩm bán chạy</a>  
                </li>

                 <li>
                     <a href="/Home/GetProductByFlg1/Sản-Phẩm-mới">Sản Phẩm mới</a>  
                </li>
            </ul>
        </div>
    </section>

    <!--Section-deal-adver -->
	 <section class="right_block main_deal">
       <h5 class="block_title"><span>Bán hàng Online</span></h5>
       <div class="block_content support">
       @if (Model.ListSalePersonModel != null)
       {
           foreach (var itemSalePerson in Model.ListSalePersonModel)
           {
                <div class="online">
                    <a href=ymsgr:sendim?@itemSalePerson.yahoo>
                    <img src="http://aptechpro.vn/Upload/Images/Yahoo-Messenger-icon.png" align="absMiddle" border="0" alt="hỗ trợ online yahoo">@itemSalePerson.yahoo
                    </a>
                 </div>
                 @*<div class="online">
                    <a onclick="Skype.tryAnalyzeSkypeUri('chat', '0');" href="skype:@itemSalePerson.skype?chat">
                        <img src="../../Upload/Images/skype-icon.png" align="absMiddle" border="0" alt="hỗ trợ online qua skype">@itemSalePerson.skype
                    </a>
                 </div>*@
                 <span class="online" style="color: #FF0000; font-size: 18px; line-height: 24px; padding-left: 36px;"> @itemSalePerson.phone</span><br>
           }
       }
            
     		 

       </div>
     </section>       
     <!--Section-deal-adver -->

     @foreach (var itemFather in Model.ListCategoryEventModel)
     {
         if (itemFather.Id == 2)
         {
                <section class="right_block mod_service">
                <h3 class="block_title"><span>
                
                    @*@Ajax.ActionLink(
                       @itemFather.Name,
                    "New",
                    new
                    {
                        Id = @itemFather.Id,
                        Page = 1
                    },
                    new AjaxOptions
                    {
                        HttpMethod = "GET",
                        InsertionMode = InsertionMode.Replace,
                        UpdateTargetId = "listProduct",
                        OnSuccess = "myonsuccessCallServer"
                    },
                    new { @class = "sidebar-color" }
                    )*@
                    <a href="/Home/DichVu/DịchVụ" class="sidebar-color">@itemFather.Name</a>
                </span></h3>
                <div class="block_content scroll-ser">
                <ul>
                    @if (itemFather.listEventModel != null)
                    {
                        int i = 0;
                        foreach (var item in itemFather.listEventModel)
                        {

                            if (item.Title.Length > 30)
                            {

                                item.Title = item.Title.Substring(0, 30);
                            }


                            if (item.IdCe == 2)
                            {
                                if (i / 2 == 0)
                                {
                                <li class="item-474 even first">
                                @*@Ajax.ActionLink(
                                    @item.Title,
                                    "NewDetail",
                                    new
                                    {
                                        Id = @item.Id
                                    },
                                    new AjaxOptions
                                    {
                                        HttpMethod = "GET",
                                        InsertionMode = InsertionMode.Replace,
                                        UpdateTargetId = "listProduct",
                                        OnSuccess = "myonsuccessCallServer"
                                    }
                                    )*@
                                    <a href="/Home/NewDetail/@item.Title.Replace(" ", "")/@item.Id">
                                        @item.Title
                                    </a>
                                </li>
                                }
                                else
                                { 
                                <li class="item-476 even last">
                                @*@Ajax.ActionLink(
                                    @item.Title,
                                    "NewDetail",
                                    new
                                    {
                                        Id = @item.Id
                                    },
                                    new AjaxOptions
                                    {
                                        HttpMethod = "GET",
                                        InsertionMode = InsertionMode.Replace,
                                        UpdateTargetId = "listProduct",
                                        OnSuccess = "myonsuccessCallServer"
                                    }
                                    )*@
                                    <a href="/Home/NewDetail/@item.Title.Replace(" ", "")/@item.Id">
                                        @item.Title
                                    </a>
                                </li>
                                }

                                i++;

                            }



                        }


                    }

                </ul>
                </div>
                </section> <!--End.section-service -->
        
        
         }
         else if (itemFather.Id == 1)
         {
                <section class="right_block mod_news">
                <h3 class="block_title"><span>
                    @*@Ajax.ActionLink(
                       @itemFather.Name,
                    "New",
                    new
                    {
                        Id = @itemFather.Id,
                        Page = 1
                    },
                    new AjaxOptions
                    {
                        HttpMethod = "GET",
                        InsertionMode = InsertionMode.Replace,
                        UpdateTargetId = "listProduct",
                        OnSuccess = "myonsuccessCallServer"
                    },
                  new { @class = "sidebar-color" }
                    )*@
                    <a href="/Home/TinTuc/TinTucVaSuKien" class="sidebar-color">@itemFather.Name</a>
                </span></h3>
               <div class="block_content scroll">
               <ul>

               @if (itemFather.listEventModel != null)
               {
                   foreach (var item in itemFather.listEventModel)
                   {
                       if (item.Title.Length > 20)
                       {

                           item.Title = item.Title.Substring(0, 20);
                       }

                       if (item.IdCe == 1)
                       { 
                                    <li class="img_news_item">       
                            
                                    @*<a href="#">
                                        <img align="left" src="http://aptechpro.vn/Upload/Images/@item.Image" />
                                    </a>*@
                                       @*@Ajax.ImageActionLink(
                                        "http://aptechpro.vn/Upload/Images/" + @item.Image,
                                        "",
                                        "NewDetail",
                                         new
                                         {
                                             Id = @item.Id
                                         },
                                         new AjaxOptions
                                         {
                                             HttpMethod = "GET",
                                             InsertionMode = InsertionMode.Replace,
                                             UpdateTargetId = "listProduct",
                                             OnSuccess = "myonsuccessCallServer"
                                         },
                                     new { @class = "pr-img-left" }
                                        )*@
                                        <a href="/Home/NewDetail/@item.Title.Replace(" ", "")/@item.Id">
                                            <img class="pr-img-left" src="http://aptechpro.vn/Upload/Images/@item.Image" />
                                        </a>
                                    <span class="title_news_item">
                                       @* @Ajax.ActionLink(
                                            @item.Title,
                                            "NewDetail",
                                            new
                                            {
                                                Id = @item.Id
                                            },
                                            new AjaxOptions
                                            {
                                                HttpMethod = "GET",
                                                InsertionMode = InsertionMode.Replace,
                                                UpdateTargetId = "listProduct",
                                                OnSuccess = "myonsuccessCallServer"
                                            }
                                            )*@
                                        <a href="/Home/NewDetail/@item.Title.Replace(" ", "")/@item.Id">
                                            @item.Title
                                        </a>
                                    </span>
                                    </li>
               
               
                       }
                   }
               }
            </ul>
            </div>
                </section><!-- END: section-blog -->
             
         
         }
         else if (itemFather.Id == 8)
         {
             
              <!--Section-deal-adver -->
	         <section class="right_block main_deal">
               <h3 class="block_title"><span>
                   @*@Ajax.ActionLink(
                       @itemFather.Name,
                    "New",
                    new
                    {
                        Id = @itemFather.Id,
                        Page = 1
                    },
                    new AjaxOptions
                    {
                        HttpMethod = "GET",
                        InsertionMode = InsertionMode.Replace,
                        UpdateTargetId = "listProduct",
                        OnSuccess = "myonsuccessCallServer"
                    },
                   new { @class = "sidebar-color" }
                    )*@
                    <a href="/Home/DoiTac/ĐốiTác" class="sidebar-color">@itemFather.Name</a>
               </span></h3>
               <div class="block_content customer">
			        <div id="carouselv" class="jscarousal-vertical">
                    @if (itemFather.listEventModel != null)
                    {
                        foreach (var item in itemFather.listEventModel)
                        {
                           <div>
                              @*  @Ajax.ImageActionLink(
                              "http://aptechpro.vn/Upload/Images/" + item.Image,
                                "",
                                "NewDetail",
                                new
                                {
                                    Id = item.Id
                                },
                                new AjaxOptions
                                {
                                    HttpMethod = "GET",
                                    InsertionMode = InsertionMode.Replace,
                                    UpdateTargetId = "listProduct",
                                    OnSuccess = "myonsuccessCallServer"
                                }
                                )*@
                               <a href="/Home/NewDetail/@item.Title.Replace(" ", "")/@item.Id">
                                   <img src="http://aptechpro.vn/Upload/Images/@item.Image" />
                               </a>
                            </div>
                        }
                    }
                   </div>
	           </div>
               <!--Section-soical -->
             </section>
             
         
         }
     }

     <!--Section-deal-adver -->
	 <section class="right_block main_deal" style="margin-top:15px;">
       <h3 class="block_title"><span>Thống kê truy cập</span></h3>
       <div class="block_content">
	   <div align='center' style="padding:10px 0"><script type="text/javascript" src="http://counter3.statcounterfree.com/private/counter.js?c=c84b5954aee1261901b2cdb0db802cd5"></script></div>
       <!--Section-soical -->
     </section>
	 
	 <br>
	 
	 
	 
         
  

    </div><!-- END: main_right -->
<!-- end.Right-collumn-->